#ifndef STUDENT_H
#define STUDENT_H
#include<string>
#include<fstream>
#include<iostream>
class Student 
{
    public:
    string id;
    string name;
    void set(string,string);
    void get();
    void save();
};
void Student::set(string id,string name)
{
    this->id=id;
    this->name=name;
}
void Student::get()
{
    cout<<"学生学号:"<<id<<","<<"学生姓名:"<<name<<endl;
}
void Student::save()
{
    ofstream f;
    f.open("student.txt",ios::out|ios::app);
    f<<id<<" "<<name<<endl;
    f.close();
}
#endif